import request from '@/utils/request'

/* 获取套餐列表的接口 */
export const fetchSetmealListAPI = (params) => {
  return request({
    url: '/setmeal/page',
    method: 'GET',
    params
  })
}

/* 删除套餐的接口 */
export const deleteSetmealAPI = (ids) => {
  return request({
    url: `/setmeal`,
    method: 'DELETE',
    params: {
      ids
    }
  })
}

/* 起售和停售套餐的接口 */
export const updateSetmealStatusAPI = (status, id) => {
  return request({
    url: `/setmeal/status/${status}`,
    method: 'POST',
    params: {
      id
    }
  })
}
